1. Field of the Invention
The present invention relates to a color conversion technology (color gamut compression technology) for placing color data inside a specific color gamut.
2. Description of the Related Art
Generally speaking, a picture input/output device, such as a printer, display, etc., processes the colors of a picture using an RGB value, a CMY value, etc. However, even if a pixel with the same RGB value or CMY value is used, the color of it in the varies depending on an input/output device and the model to be used. Therefore, the RGB value and CMY value are color data values dependent on the manufacturer of an input/output device and the model to be used. For example, with a CMY value, the density information of three colors, cyan, magenta and yellow, is used as a numeric value to instruct a printer to print a color. For example, a C value, M value and Y value can have a value between 0 and 255, and by transmitting or outputting the C value, M value and Y value of a pixel composing an outputted picture, to a printer, the amount of cyan, magenta and yellow ink corresponding to the C value, M value and Y value are painted on a printing medium, such as paper, etc., for each pixel through the printing head of a printer under the control of the controller of the printer. Thus, a CMY value is an indexed numeric value for instructing the printing head as to the amount of cyan, magenta and yellow ink that should be painted for each pixel. However, even if the same CMY value is designated, an actually processed color varies depending on the manufacturer of an input/output device and the model to be used, since the kind of ink to be used and the ink painting mechanism varies depending on the manufacturer of an input/output device and the model to be used. The same phenomenon occurs in the case of a display in which an RGB value is used. In the case of a display value, a variety of colors of a color picture are processed by instructing a display as to the degree of lightness (gradation) for each of red, green and blue for each pixel using the numeric values R, G and B.
There is a method for processing color data that is independent of an input/output device and is based on absolute color data values (L*a*b*, XYZ, etc.), which serves to unify output colors among a variety of input/output devices. For example, in order to output a color of a certain L*a*b* value on a printer, it is sufficient to convert the L*a*b* value to an appropriate CMY value according to the color processing characteristics of the CMY value of each printer and to transmit the CMY value to a printer to print the color. Basically, by compensating for color processing characteristics, all printers can print the same picture in the same colors. A technology to convert color data between different color data values (for example, from an L*a*b* value to a CMY value, as described above) like this is termed a color conversion technology. Generally speaking, in a color conversion technology, a table in which the color correspondence between an intermediate color space, such as an L*a*b* space, etc., and a device-dependent color space, such as a CMY space, RGB space, etc., is registered (color conversion table) is prepared, and colors to be actually outputted to a device (CMY value, RGB value, etc.) are obtained by converting colors by referring to the table. Colors which are not registered in the table are converted and obtained by executing an interpolation process using data registered in the table.
In order to put the color conversion technology into practice, it is necessary to take into consideration only a color range for which a device can output colors (color gamut). More specifically, in order to output color data which are outside the range of a color gamut, to a printer or display, it is necessary to convert the values of the color data to values contained within the range of the color gamut. Such a technology to place color data which are outside the range of a color gamut and within the range of the color gamut of a device is called a color gamut conversion technology. Essentially, color conversion technology, it is important to convert color data to a color that is as close as possible to its color data value before before being outputted.
Therefore, to output colors in a wide range, including colors other than those in the color gamut of a device, that are as close to the original color as possible, both an accurate color conversion technology that converts different color data values and a color gamut conversion technology that changes the color as little as possible are required.
Here, first a case where an L*a*b* value is converted to a CMY value using a color conversion table in which CMY values corresponding to the colors of L*a*b* values distributed in a grid shape in an L*a*b* space are registered is described as an example of color conversion technology using an interpolation operation.
Usually, in an L*a*b* space L* takes a value in the range of 0 to 100, and a* and b* take a value in the range of xe2x88x92128 to 127. However, in the following description, 2.55 times an ordinary value is used for an L* value, and an ordinary value plus 128 is used for a* and b* values for convenience (L255* value, a255* value, b255* value). This is because an L* value, a* value and b* value can be handled as a value in the range of 0 to 255.
It is assumed that colors distributed in a grid shape in an L*a*b* space (in the following example, 0, 32, 64, 96, 128, 160, 192, 224 and 255 are the 9 values used for the L255* value, a255* value and b255* value), which are color values after conversion (CMY value) corresponding to colors of a conversion source (L255* value, a255* value, b255* value), are stored in the color conversion table in which colors are distributed in a grid shape. Specifically, it is assumed that a C value, M value and Y value are stored in the following three-dimensional arrays: C [L] [a] [b], M [L] [a] [b] and Y [L] [a] [b]. L, a and b are the numbers of a grid point in the L*a*b* space (grid number). For example, the grid numbers corresponding to the minimum value (0, 0, 0) of (L255* value, a255* value, b255* value) are L=1, a=0, b=0, grid numbers corresponding to (32, 0, 0) are L=1, a=0, b=0, and grid numbers corresponding to (32, 128, 128) are L=1, a=4, b=4.
An example of a color conversion is given below. For the conversion, a method for performing an interpolation operation using eight points (in the shape of a cubic grid) surrounding an L255* value, a255* value, b255* value (Lconv, aconv, bconv) to be converted is adopted. Lconv, aconv and bconv are variables indicating an L255* value, a255* value and b255* value, respectively.
FIG. 1 explains how to perform an interpolation operation.
(1) Selects Grid Points to be Used for Interpolation (Eight Points Surrounding an L*a*b* Value (Lconv, aconv, bconv) to be Converted (Selects a Cube)
In the following description, w is an interval between grids in the L*a*b* space, and is assumed to be 32 as described above. (int) indicates the omission of decimal places. L, a and b are grid numbers.
L=(int)(Lconv/w),
a=(int)(aconv/w),
b=(int)(bconv/w)xe2x80x83xe2x80x83(1)
In addition to the grid point (L, a, b) calculated by the above equations (1), grid points of (L+1, a, b), (L, a+1, b), (L, a, b+1), (L, a+1, b+1), (L+1, a, b+1), (L+1, a+1, b) and (L+1, a+1, b+1) are used for interpolation operation. These eight grid points are the vertices of a cube 100 shown in FIG. 1.
(2) Calculates Positions Inside a Cube
Calculates the positions (Lw, aw, bw) inside the cube 100 of an L*a*b* value using the following equations (2).
Lw=(Lconv/wxe2x88x92L)xc2x7w
aw=(aconv/wxe2x88x92a)xc2x7w
bw=(bconv/wxe2x88x92b)xc2x7wxe2x80x83xe2x80x83(2)
(3) Calculates Weight Coefficients (the Volumes of Rectangular Parallelepipeds Generated by Dividing (V (0, 0, 0) to V (1, 1, 1); and Calculates the Volume of Rectangular Parallelepipeds Surrounded by Dotted Lines Shown in FIG. 1)
Calculates their volumes from the positions (Lw, aw, bw) inside the cubic of the L*a*b* value using the equations (3).
xe2x80x83V(0, 0, 0)=(wxe2x88x92Lw)xc2x7(wxe2x88x92aw)xc2x7(wxe2x88x92bw)
V(1, 0, 0)=Lwxc2x7(wxe2x88x92aw)xc2x7(wxe2x88x92bw)
V(0, 1, 0)=(wxe2x88x92Lw)xc2x7awxc2x7(wxe2x88x92bw)
V(0, 0, 1)=(wxe2x88x92Lw)xc2x7(wxe2x88x92aw)xc2x7bw
V(0, 1, 1)=(wxe2x88x92Lw)xc2x7awxc2x7bw
V(1, 0, 1)=Lwxc2x7(wxe2x88x92aw)xc2x7bw
V(1, 1, 0)=Lwxc2x7awxc2x7(wxe2x88x92bw)
V(1, 1, 1)=Lwxc2x7awxc2x7bwxe2x80x83xe2x80x83(3)
(4) Performs an Interpolation Process
Calculates means weighted with the V (0, 0, 0) to V (1, 1, 1) of the CMY value of (L, a, b), (L+1, a, b), (L, a+1, b), (L, a, b+1), (L, a+1, b+1), (L+1, a, b+1), (L+1, a+1, b) and (L+1, a+1, b+1).
C=(C [L], [a], [b]xc2x7V(0, 0, 0)+
C[L+1][a][b]xc2x7V(1, 0, 0)+
C[L][a+1][b]xc2x7V(0, 1, 0)+
C[l][a][b+1]xc2x7V(0, 0, 1)+
C[L][a+1][b+1]xc2x7V(0, 1, 1)+
C[L+1][a][b+1]xc2x7V(1, 0, 1)+
C[L+1][a+1][b]xc2x7V(1, 1, 0)+
C[L+1][a+1][b+1]xc2x7
V(1, 1, 1)/(wxc2x7wxc2x7w)
M=(M[L][a][b]xc2x7V(0, 0, 0)+
M[L+1][a][b]xc2x7V(1, 0, 0)+
M[L][a+1][b]xc2x7V(0, 1, 0)+
M[L][a][b+1]xc2x7V(0, 0, 1)+
M[L][a+1][b+1]xc2x7V(0, 1, 1)+
M[L+1][a][b+1]xc2x7V(1, 0, 1)+
M[L+1][a+1][b]xc2x7V(1, 1, 0)+
M[L+1][a+1][b+1]xc2x7V(1, 1, 1)/(
wxc2x7wxc2x7w)
Y=(Y[L][a][b]xc2x7V(0, 0, 0)+
Y[L+1][a][b]xc2x7V(1, 0, 0)+
Y[L][a+1][b]xc2x7V(0, 1, 0)+
Y[L][a][b+1]xc2x7V(0, 0, 1)+
Y[L][a+1][b+1 
]xc2x7V(0, 1, 1)+
Y[L+1][a][b+1 
]xc2x7V(1, 0, 1)+
Y[L][a+1][b+1 
]xc2x7V(0, 1, 1)+
Y[L+1][a][b+1 
]xc2x7V(1, 0, 1)+
Y[L+1][a+1 
][b]xc2x7V(1, 1, 0)+
Y[L+1][a+1][b+1
]xc2x7V(1, 1, 1)/(wxc2x7wxc2x7w)xe2x80x83xe2x80x83(4)
The preceding completes the summary of the color conversion method.
In the color conversion operation, a CMY value after conversion (C, M, Y) is calculated by referring to a CMY value registered in a table (which is composed of three-dimensional arrays, C [L] [a] [b], M [L] [a] [b] and Y [L] [a] [b], corresponding to cyan, magenta and yellow, respectively), as seen from equation (4). Therefore, data must be set in the CMY value of the table. Specifically, CMY values required for use in the interpolation process of equation (4), must be registered in the table. For this reason, it is also necessary to register an appropriate CMY value required to output an L*a*b* value for the grid points of an L*a*b* value located outside the color gamut of a printer.
For an L*a*b* value inside the color gamut which can be outputted by a printer, its CMY value can be set based on the actually measured value (L*a*b* value) outputted by the printer. For a method for obtaining correspondence between L*a*b* values and CMY values from the actually measured values outputted by the printer in order to generate a table, for example, a method described in the specification of Japanese Patent Application No. 9-241491 can be used. Although this actually measured value is, firstly, an L*a*b* value corresponding to the color of a grid point (CMY value), a table in which a CMY value corresponding to the point located in an L*a*b* space in a grid shape is registered using the method described in the specification of Japanese Patent Application No. 9-241491 and is generated based on this. L*a*b* values in this table are designated as the initial input of the present invention, which is described later.
For an L*a*b* value outside the color gamut of a printer, it is necessary to determine in advance an L*a*b* value inside the color gamut corresponding to the L*a*b* value outside the color gamut and to determine a CMY value corresponding to the L*a*b* value inside the color gamut. A process of determining an L*a*b* value inside the color gamut corresponding to the L*a*b* value outside the color gamut is color gamut conversion. In the color gamut conversion process it is important to change the colors as little as possible before conversion, and to maintain the relative balance between colors.
For information about conventional color conversion methods, please refer to the following literature.
J. Morovic, xe2x80x9cTo Develop A Universal Gamut Mapping Algorithm-Literature Surveyxe2x80x9d, Design Research Center, University of Derby (1997).
In this literature, a chord clipping method is introduced as an example of high-performance color conversion technology.
FIG. 2 summarizes a chord clipping method.
FIG. 2 is a section view of an L*a*b* space which is divided on the plane of the same hue as a color to be converted. xe2x80x9csqrtxe2x80x9d in FIG. 2 means to calculate the square-root of a value in parentheses. In the following description, xe2x80x9csqrtxe2x80x9d has this meaning, unless otherwise stated.
As shown in FIG. 2, an achromatic color of the same hue as a color to be converted and of the same lightness (L*) as the color to be converted of the highest saturation (C*) is set on a lightness L* axis. A point representing a color to be converted: (xe2x80x9cxe2x97xafxe2x80x9d) is connected with a point A on the lightness L* axis of the achromatic color using a straight line, and the color to be converted is converted toward the set achromatic color. When the point representing the color to be converted shifts toward a point A on the straight line, a point (xe2x80x9c◯xe2x80x9d) at which the color to be converted crosses the boundary of the color gamut D of a printer (in a broader sense, the color gamut of a printing device) is designated as a point indicating the color after conversion.
With another conventional technology, a method which performs a conversion to a color inside the nearest color gamut is also introduced. Hereinafter this is called the xe2x80x9cclosest neighborhood methodxe2x80x9d.
FIG. 3 roughly explains the closest neighborhood method.
FIG. 3 is a section view of an L*a*b* space which is divided on a plane of the same hue as a color to be converted, as shown in FIG. 2.
The closest neighborhood method is designed to convert a color to a point which is at the shortest distance from the color to be converted on the boundary of the color gamut of a printer. There are several closest neighborhood methods. For example, there is a plane closest neighborhood method and a three-dimensional closest neighborhood method. The plane closest neighborhood method is designed to convert a point representing a color to be converted (xe2x80x9cxe2x97xafxe2x80x9d) on a plane of the same hue as that of the point, and it is designed so that on this hue plane, the angle formed by both a straight line, connecting a point before conversion (xe2x80x9cxe2x97xafxe2x80x9d) with a point after conversion (xe2x80x9c◯xe2x80x9d), and a line indicating the boundary of the color gamut D1 of a printer always yields a right angle. However, the three-dimensional closest neighborhood method is designed to convert the color to be converted to a point located nearest to it on the boundary of the color gamut in three-dimensional space, without limiting the direction of conversion to the same hue plane as the point representing the color to be converted. Therefore, the straight line connecting a point before conversion and a point after conversion becomes perpendicular to the boundary surface of the color gamut including the point after conversion.
However, both the chord clipping method and the closest neighborhood method have the following problems.
First, the problems of the chord clipping method are described.
FIGS. 4A and 4B explain the problems of the chord clipping method.
The color gamut shown in FIG. 4A indicates the color gamut D2 of the yellow hue of a printer. In the yellow hue, the vertex MC (with the highest saturation and the brightest color) of the color gamut of the printer is biased to a relatively lighter color. Therefore, the color gamut border line b connecting the vertex and the point ML of the lightness (white) of the achromatic color has a very small inclination and is located fairly close to (immediately next to) the line of the equal degree of lightness. For this reason, when a color is converted using the chord clipping method, the saturation of a color with lightness than the lightness of the vertex MC will be greatly changed by conversion.
When a CMY value to be registered in a table is generated based on the conversion result obtained by this method, the following problems occur.
FIG. 4B shows both the situation of the shift due to conversion of the L*a*b* value of a grid point located on the color gamut boundary (yellow of high lightness) and the situation of color conversion performed by interpolation operation using the grid point. Black and white circles indicate the color of the grid point and the color after conversion. For the purpose of comparison FIG. 4C shows the conversion situation with the closest neighborhood method For a color located inside a color gamut D2, an L*a*b* value registered in a table outputs colors corresponding to the L*a*b* value of a grid point in an L*a*b* space to a printer, since there is no need to shift them in a conversion process. For a grid point located outside the color gamut D2, a CMY value which outputs a color corresponding to the L*a*b* value indicated by a white circle after converting it to a point indicated by a white circle, is registered.
A case where a color conversion is performed by interpolation operation using a registered table is studied. Although, generally speaking and as described earlier, the interpolation operation is performed in a three-dimensional space, it is described in FIG. 4B in such a way that it is performed by interpolation operation on a plane of the same hue as that used for convenience. For example, a CMY value is assumed to be obtained by performing a color conversion for an L*a*b* value marked by xe2x80x9cxxe2x80x9d. Since the color indicated by xe2x80x9cxxe2x80x9d is located inside the color gamut D2, it is not originally required to be converted.
However, in the chord clipping method, an L*a*b* value indicated by xe2x80x9cxxe2x80x9d is calculated by the interpolation operation of a CMY value corresponding to an L*a*b* value (P1xe2x80x2, P2xe2x80x2) which is obtained after performing color gamut conversion for a CMY value indicated by a grid point located outside the color gamut D2. As shown in FIG. 4B, if a color conversion is performed in this situation, the amount of grid points P1 and P2 shift become large. Therefore, if a color conversion by interpolation operation is performed using the CMY value of a grid point (P1xe2x80x2, P2xe2x80x2) obtained from such a color gamut conversion, a CMY value corresponding to an L*a*b* value of which the saturation has been substantially degraded must be calculated. Thus, colors inside the color gamut D2 indicated by xe2x80x9cxxe2x80x9d in FIG. 4B have also been affected by the color gamut conversion and saturation is greatly degraded, which is a problem. Since originally colors inside the color gamut can be more faithfully reproduced without color conversion, it is a great problem. As clearly seen, if this result is compared with the result of the same color conversion performed by the closest neighborhood method, as shown in FIG. 4C (P1xe2x80x3 and P2xe2x80x3 shown in FIG. 4C are the shifted positions of the grid points P1 and P2), the reduced saturation of a point indicated by xe2x80x9cxxe2x80x9d becomes far larger in the case of the chord clipping method than in the case of the closest neighborhood method. Therefore, if the gradation is compared with that in the case of the closest neighborhood method, it is a big problem with the chord clipping method. In the following description this is called problem 1.
Next, the problem of the closest neighborhood method is described. As shown in FIG. 3, in this method, a color outside a color gamut D1 of which the saturation is higher than the vertex MC of the color gamut D1 and which has a fairly wide range S, for example, three colors located on the right side of FIG. 3 (three xe2x80x9cxe2x97xafxe2x80x9d) are converted to the same color (the vertex MC of the color gamut D1). This is because a point on the boundary of the nearest color gamut D1 commonly becomes the vertex MC. Thus, many colors that were different before conversion all become the same color after conversion, and much of the balance between colors is lost, which is a problem. In the following description, this problem is called problem 2.
The object of the present invention is to provide a color gamut conversion technology for which the reduction in accuracy is small, when it is used simultaneously with a color gamut conversion technology by interpolation operation widely used as a high-speed and accurate color conversion.
The color conversion method of the present invention converts color data to color data inside a target color gamut, and comprises the steps of (a) judging whether color data to be converted are contained in an area predetermined for the target color gamut, and (b) converting the color data using one of at least two color gamut conversion methods or combining two or more color gamut conversion methods according to the judgment result in step (a) and outputting the result of the conversion.
The color conversion apparatus of the present invention converts color data to color data inside a target color gamut, and comprises a judging unit for judging whether color data to be converted are contained in an area predetermined for the target color gamut and a conversion unit for converting the color data using one of at least two color gamut conversion methods or combining two or more color gamut conversion methods according to the judgment by the judging unit and outputting the result of the conversion.
The color conversion table of the present invention converts colors displayed on a first device to colors which can be displayed on a second device, and both color data values generated by a color conversion method comprising the steps of (a) judging whether color data to be converted are contained in an area predetermined for the target color gamut and converting the color data using one of at least two color gamut conversion methods or combining two or more color gamut conversion methods according to the judgment result in step (a) and outputting the result of the conversion, and the color data values of the second device corresponding to them are registered therein.
The device driver of the present invention is designed for a second device, outputs colors displayed on a first device as colors which can be displayed on a second device, and includes a color conversion table in which both color data values generated by a color conversion method comprising the steps of (a) judging whether color data to be converted are contained in an area predetermined for the target color gamut and converting the color data using one of at least two color gamut conversion methods or combining two or more color gamut conversion methods according to the judgment result in step (a) and outputting the result of the conversion, and the color data values of the second device corresponding to them are registered.
According to the present invention, when performing a color gamut conversion in which color data located outside a target color gamut are converted to color data inside the target color gamut, at least two color gamut conversion methods with different characteristics are prepared. Depending on the position in which color data to be converted is located in a color gamut, the color data are converted to color data contained inside the target color gamut using a method in which a problem is unlikely to occur, out of at least two color gamut conversion methods. Alternatively, since the color data are converted by combining a plurality of color gamut conversion methods, or composing the conversion results of a plurality of color gamut conversion methods and a final conversion result, the occurrence of the problems of the respective color gamut conversion methods can be suppressed.
Accordingly, by using a device driver including a color conversion table, generated as a result of conversion, and driving a color picture output device (for example, a printer as a second device), a color picture can be outputted from a second device while the colors outputted by a first device are maintained as faithful to the originals as possible.